The present disclosure relates to a communication device and storage medium suitable for connection to a wireless LAN (Local Area Network).
Typically, in devices such as portable terminals and image-forming apparatuses that are compatible with P2P (Peer to Peer) communication and that include a function for communication based on the P2P (Peer to Peer) method (for example, Wi-Fi Direct (registered trademark) as a wireless LAN) (hereafter, referred to as P2P (Peer to Peer) communication), it is possible to transmit and receive data directly even when there is no access point (AP) in Wi-Fi (registered trademark) communication (Ad-hoc mode).
In typical technology related to this kind of P2P communication, it is determined whether or not a specified external device of a communicating party satisfies specified conditions, and when that device does not satisfy the specified conditions, whether or not to execute wireless communication with that device is determined based on a user instruction. When it is determined that the device does satisfy specified conditions, there are communication devices that determine whether to operate as an access point or to operate as a client.